<?php
class adoconnect
{
	Public $parameter=array("server","uid","pid");
	Private $Conn;
	Public function connect($parameter)
	{
		$connstring=NULL;
		foreach ($parameter as $i =>$value)
		{
			if ($value==NULL)
				switch ($i){
					case "server":$value='localhost';break;
					case "uid":$value='netuser';break;
					case "pid":$value="";break;
				}
			$connstring=$connstring.",".$value;				
		}
		$Conn=mysql_connect($connstring);
		if (!$Conn)
			return 'Could not connect!'.mysql_error();
		else
		{
			mysql_selectdb('learn',$Conn);
			return 'Connected! Use $Conn to get resource';
		} 
	}
}


class Recordset
{
	Public $records;
	Public $sql;	
	function __construct()
	{
		if (!mysql_ping())
		{
			$Connect=new adoconnect();
			$Connect->connect();
		}
	}
	
}